# -*- coding: utf-8 -*-

import clutter
import utils.actions

class KeyboardMapping:
    def __init__(self):
        self.listActions = {
            clutter.keysyms.w: utils.actions.SHOW_WIDGETS,
            clutter.keysyms.h: utils.actions.HIDE_WIDGETS,            
            clutter.keysyms.s: utils.actions.FADE_IN_WIDGETS,
            clutter.keysyms.q: utils.actions.FADE_OUT_WIDGETS,
            clutter.keysyms.r: utils.actions.REMOVE_WIDGET,
            clutter.keysyms.o: utils.actions.SHOW_AVAILABLE_WIDGETS      
        }
        
        self.numericKey = {
            clutter.keysyms._0: 0,
            clutter.keysyms._1: 1,
            clutter.keysyms._2: 2,
            clutter.keysyms._3: 3,
            clutter.keysyms._4: 4,
            clutter.keysyms._5: 5,
            clutter.keysyms._6: 6,
            clutter.keysyms._7: 7,
            clutter.keysyms._8: 8,
            clutter.keysyms._9: 9
	    }

    def action(self, event):
        if self.listActions.has_key(event.keyval):
            return self.listActions[event.keyval]



class RemoteControlMapping:
    def __init__(self):
        self.listActions = {}


    def action(self,event):
        if event in self.listActions:
            return self.listActions[event]